//
//  ViewController.m
//  04-HomeWork
//
//  Created by 李昊林 on 16/7/19.
//  Copyright © 2016年 李昊林. All rights reserved.
//

#import "ViewController.h"
#import "AppDelegate.h"
@interface ViewController ()

@end

@implementation ViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view, typically from a nib.
    UIImageView *BKImageView = [[UIImageView alloc]initWithFrame:[UIScreen mainScreen].bounds];
    BKImageView.image = [UIImage imageNamed:@"welcome_2.jpg"];
    [self.view addSubview:BKImageView];
    
    UIButton *btn = [[UIButton alloc] initWithFrame:CGRectMake(20, 30 , 30 , 30)];
    [btn setImage:[UIImage imageNamed:@"baibiao.png"] forState:UIControlStateNormal];
    [btn addTarget:self action:@selector(Choose:) forControlEvents:UIControlEventTouchUpInside];

    [self.view addSubview:btn];
    
    UITextField * songName = [[UITextField alloc] initWithFrame:CGRectMake(190, 30, 60, 30)];
    [songName setText:@"稻香"];
    [songName setTextColor:[UIColor whiteColor]];
    [self.view addSubview:songName];
    
    UIButton *btn1 = [[UIButton alloc] initWithFrame:CGRectMake(370, 30, 30, 30)];
    [btn1 setImage:[UIImage imageNamed:@"baidian.png"] forState:UIControlStateNormal];
    [btn1 addTarget:self action:@selector(More:) forControlEvents:UIControlEventTouchUpInside];

    [self.view addSubview:btn1];
    
    UIView *view1 = [[UIView alloc] initWithFrame:CGRectMake(120, 83, 40, 2)];
    view1.backgroundColor = [UIColor whiteColor];
    [self.view addSubview:view1];
    
    UITextField *songer = [[UITextField alloc] initWithFrame:CGRectMake(180, 70, 90, 30)];
    [songer setText:@"周杰伦"];
    [songer setTextColor:[UIColor whiteColor]];
    [self.view addSubview:songer];
    
    UIView *view2 = [[UIView alloc] initWithFrame:CGRectMake(250, 83, 40, 2)];
    view2.backgroundColor = [UIColor whiteColor];
    [self.view addSubview:view2];
    
    UIButton *btn2 = [[UIButton alloc] initWithFrame:CGRectMake(60, 100, 60, 30)];
    [btn2 setImage:[UIImage imageNamed:@"normal.png"] forState:UIControlStateNormal];
    [btn2 addTarget:self action:@selector(kind:)forControlEvents:UIControlEventTouchUpInside];
    [self.view addSubview:btn2];
    
    UIButton *btn3 = [[UIButton alloc] initWithFrame:CGRectMake(135, 100, 60, 30)];
    [btn3 setImage:[UIImage imageNamed:@"personal.png"] forState:UIControlStateNormal];
    [btn3 addTarget:self action:@selector(personal:) forControlEvents:UIControlEventTouchUpInside];
    [self.view addSubview:btn3];

    UIButton *btn4 = [[UIButton alloc] initWithFrame:CGRectMake(215, 100, 60, 30)];
    [btn4 setImage:[UIImage imageNamed:@"MV.png"] forState:UIControlStateNormal];
    [btn4 addTarget:self action:@selector(MV:) forControlEvents:UIControlEventTouchUpInside];
    [self.view addSubview:btn4];
    
    UIButton *btn5 = [[UIButton alloc] initWithFrame:CGRectMake(290, 100, 60, 30)];
    [btn5 setImage:[UIImage imageNamed:@"dts.png"] forState:UIControlStateNormal];
    [btn5 addTarget:self action:@selector(dts:)forControlEvents:UIControlEventTouchUpInside];
    [self.view addSubview:btn5];
    
    UITextField *ss = [[UITextField alloc] initWithFrame:CGRectMake(150, 500, 150, 30)];
    [ss setText:@"稻香 -- 周杰伦"];
    [ss setTextColor:[UIColor whiteColor]];
    [self.view addSubview:ss];

    UISlider *slider = [[UISlider alloc] initWithFrame:CGRectMake(55, 550, 290, 30)];
    slider.minimumTrackTintColor = [UIColor greenColor];
    slider.minimumValue = 0.0f;
    slider.maximumValue = 1.0f;
    [slider addTarget:self action:@selector(sliderAction:) forControlEvents:UIControlEventValueChanged];
    
    [self.view addSubview:slider];
    
    
    UIButton *btn6 = [[UIButton alloc] initWithFrame:CGRectMake(160, 580, 80, 80)];
    [btn6 setImage:[UIImage imageNamed:@"play.png"] forState:UIControlStateNormal];
    [btn6 addTarget:self action:@selector(Play:) forControlEvents:UIControlEventTouchUpInside];
    [self.view addSubview:btn6];

    UIButton *btn7 = [[UIButton alloc] initWithFrame:CGRectMake(50, 575, 90, 90)];
    [btn7 setImage:[UIImage imageNamed:@"before.png"] forState:UIControlStateNormal];
    [btn7 addTarget:self action:@selector(before:) forControlEvents:UIControlEventTouchUpInside];
    [self.view addSubview:btn7];
    
    UIButton *btn8 = [[UIButton alloc] initWithFrame:CGRectMake(270, 580, 80, 80)];
    [btn8 setImage:[UIImage imageNamed:@"next.png"] forState:UIControlStateNormal];
    [btn8 addTarget:self action:@selector(next:) forControlEvents:UIControlEventTouchUpInside];
    [self.view addSubview:btn8];
    
    UIButton *btn9 = [[UIButton alloc] initWithFrame:CGRectMake(20, 650, 50, 50)];
    [btn9 setImage:[UIImage imageNamed:@"love.png"] forState:UIControlStateNormal];
    [btn addTarget:self action:@selector(love:) forControlEvents:UIControlEventTouchUpInside];
    [self.view addSubview:btn9];
    
    UIButton *btn10 = [[UIButton alloc] initWithFrame:CGRectMake(100, 650, 50, 50)];
    [btn10 setImage:[UIImage imageNamed:@"repeat.png"] forState:UIControlStateNormal];
    [btn10 addTarget:self action:@selector(turn:) forControlEvents:UIControlEventTouchUpInside];
    [self.view addSubview:btn10];
    
    UIButton *btn11 = [[UIButton alloc] initWithFrame:CGRectMake(175, 650, 50, 50)];
    [btn11 setImage:[UIImage imageNamed:@"download.png"] forState:UIControlStateNormal];
    [btn11 addTarget:self action:@selector(download:) forControlEvents:UIControlEventTouchUpInside];
    [self.view addSubview:btn11];
    
    UIButton *btn12 = [[UIButton alloc] initWithFrame:CGRectMake(255, 650, 50, 50)];
    [btn12 setImage:[UIImage imageNamed:@"share.png"] forState:UIControlStateNormal];
    [btn12 addTarget:self action:@selector(share:) forControlEvents:UIControlEventTouchUpInside];
    [self.view addSubview:btn12];
    
    UIButton *btn13 = [[UIButton alloc] initWithFrame:CGRectMake(335, 650, 50, 50)];
    [btn13 setImage:[UIImage imageNamed:@"songlist.png"] forState:UIControlStateNormal];
    [btn13 addTarget:self action:@selector(songlist:) forControlEvents:UIControlEventTouchUpInside];
    [self.view addSubview:btn13];

}

- (void)sliderAction:(UISlider *)sliderControl{
    NSLog(@"%f", sliderControl.value);
}

- (void)Choose:(UIButton *)btn {
    NSLog(@"菜单");
}
- (void)More:(UIButton *)btn1 {
    NSLog(@"更多");
}
- (void)kind:(UIButton *)btn2 {
    NSLog(@"品质");
}
- (void)personal:(UIButton *)btn3 {
    NSLog(@"独家");
}
- (void)MV:(UIButton *)btn4 {
    NSLog(@"观看MV");
}
- (void)dts:(UIButton *)btn5 {
    NSLog(@"dts");
}
- (void)Play:(UIButton *)btn6 {
    NSLog(@"播放");
}
- (void)before:(UIButton *)btn7 {
    NSLog(@"上一首");
}
- (void)next:(UIButton *)btn8 {
    NSLog(@"下一首");
}
- (void)love:(UIButton *)btn9 {
    NSLog(@"收藏");
}
- (void)turn:(UIButton *)btn10 {
    NSLog(@"播放顺序");
}
- (void)download:(UIButton *)btn11 {
    NSLog(@"下载");
}
- (void)share:(UIButton *)btn12 {
    NSLog(@"分享");
}
- (void)songlist:(UIButton *)btn13 {
    NSLog(@"播放列表");
}
- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

@end
